home *** CD-ROM | disk | FTP | other *** search
/ TOS Silver 2000 / TOS Silver 2000.iso / programm / MM2_DEV / S / TEST / GETLINES.M < prev    next >
Encoding:
Text File  |  1991-04-28  |  2.5 KB  |  106 lines

  1. MODULE GetLnSty;
  2.  
  3.  
  4. (*
  5.  *  Einfaches Testmodul für Proc. 'GetLineStyle' aus 'VDIInquires'
  6.  *
  7.  *  Wolfgang Schmitz; Uni Wuppertal, FB 13 (Prof. G. Schauf); 24.04.91
  8.  *)
  9.  
  10.  
  11. FROM SYSTEM IMPORT ASSEMBLER;
  12. FROM GEMEnv        IMPORT InitGem, ExitGem, RC, CurrGemHandle,
  13.                           GemHandle, DeviceHandle;
  14. FROM InOut         IMPORT GotoXY, WriteCard, Read, WriteLn, WriteString;
  15. FROM GEMGlobals    IMPORT LineType, LineEnding, MarkerType;
  16. FROM GrafBase      IMPORT WritingMode;
  17. FROM Terminal      IMPORT GetChar;
  18. FROM VDIInquires   IMPORT GetLineStyle, GetMarkerStyle;
  19. FROM VDIAttributes IMPORT SetLineColor, SetLineType, SetLineEndings,
  20.                           SetWritingMode, SetLineWidth;
  21.  
  22.  
  23. VAR
  24.   gemHandle: GemHandle;
  25.   devHandle: DeviceHandle;
  26.   ok: BOOLEAN;
  27.   ch: CHAR;
  28.  
  29.   Ltyp: LineType;
  30.   Lcolor, Lwidth: CARDINAL;
  31.   Lmode: WritingMode;
  32.   Lbegin, Lend: LineEnding;
  33.  
  34.  
  35. BEGIN
  36.  
  37.   InitGem(RC, devHandle, ok);
  38.   gemHandle:= CurrGemHandle();
  39.  
  40.  
  41.   SetLineType(devHandle, dottedLn);
  42.   SetLineColor(devHandle, 1);
  43.   SetWritingMode(devHandle, transWrt);
  44.   SetLineEndings(devHandle, arrowedLn, arrowedLn);
  45.   SetLineWidth(devHandle, 3);
  46.  
  47.  
  48.  
  49.   GetLineStyle(devHandle, Ltyp, Lcolor, Lmode, Lbegin, Lend, Lwidth);
  50.  
  51.  
  52.  
  53.   GotoXY(0, 3);
  54.   WriteString('            " SOLL "                " IST "');
  55.  
  56.   GotoXY(0, 5);
  57.   WriteString('LineType:');
  58.   GotoXY(14, 5);
  59.   WriteCard(ORD(dottedLn), 3);   WriteCard(ORD(Ltyp),24);
  60.   WriteString('              Weiter?  >Taste< ');   GetChar(ch);
  61.  
  62.  
  63.   GotoXY(0, 7);
  64.   WriteString('LineColor:');
  65.   GotoXY(14, 7);
  66.   WriteCard(1, 3);   WriteCard(Lcolor, 24);
  67.   WriteString('              Weiter?  >Taste< ');   GetChar(ch);
  68.  
  69.  
  70.   GotoXY(0, 9);
  71.   WriteString('LineMode:');
  72.   GotoXY(14, 9);
  73.   WriteCard(ORD(transWrt), 3);   WriteCard(ORD(Lmode), 24);
  74.   WriteString('              Weiter?  >Taste< ');   GetChar(ch);
  75.  
  76.  
  77.   GotoXY(0, 11);
  78.   WriteString('LineBegin:');
  79.   GotoXY(14, 11);
  80.   WriteCard(ORD(arrowedLn), 3);   WriteCard(ORD(Lbegin), 24);
  81.   WriteString('              Weiter?  >Taste< ');   GetChar(ch);
  82.  
  83.  
  84.   GotoXY(0, 13);
  85.   WriteString('LineEnd:');
  86.   GotoXY(14, 13);
  87.   WriteCard(ORD(arrowedLn), 3);   WriteCard(ORD(Lend), 24);
  88.   WriteString('              Weiter?  >Taste< ');   GetChar(ch);
  89.  
  90.  
  91.   GotoXY(0, 15);
  92.   WriteString('LineWidth:');
  93.   GotoXY(14, 15);
  94.   WriteCard(3, 3);   WriteCard(ORD(Lwidth), 24);
  95.   WriteString('              Ende ?  >Taste< ');   GetChar(ch);
  96.  
  97.  
  98.  
  99. ExitGem(gemHandle);
  100.  
  101.  
  102.  
  103.  
  104.  
  105. END GetLnSty.
  106.